using System;
using System.Linq.Expressions;
using PowerfulExtensions.Helpers;

namespace PowerfulExtensions.ClassMembers
{
    public static class MemberHelper
    {
        public static string GetName<TObject>(Expression<Func<TObject>> exp)
        {
            return ExpressionHelper.GetMember(exp).Name;
        }

        public static string GetName<TClass>(Expression<Func<TClass, object>> exp)
        {
            return ExpressionHelper.GetMember(exp).Name;
        }
    }
}
